Low-cost microcontrollers or microprocessors can be used to perform simple tasks, for example to monitor rotation speed or control motors; both species will generically be referred to hereinafter as xe2x80x9cmicroprocessors.xe2x80x9d Low-cost microprocessors of this kind often contain only a minimum number of functions. An internal watchdog circuit is usually not present in them.
A xe2x80x9cwatchdogxe2x80x9d refers to a circuit which monitors whether the microprocessor is operating correctly and which, when a fault is ascertained, authorizes appropriate steps for correction, for example a reset operation for the microprocessor, so that the latter begins to operate with defined initial values (xe2x80x9cinitializationxe2x80x9d) from a specific program point. More-expensive microprocessors usually have such a watchdog function built in, or they have externally a corresponding additional circuit.
If no such watchdog circuit is present, the problem arises of operating the microprocessor reliably. For example, if the latter does not achieve a clean reset (power-up reset) after operating voltage is switched on, its microprogram may in some circumstances not start at a defined point, which can then result in corresponding faults. A microprocessor of this kind can also be disturbed by external influences, for example by bursts, transient pulse groups, etc. (tests defined by IEC 801-2 and IEC 801-4). Large fluctuations in supply voltage can also result in program execution faults.
In all these cases, the operation of the microprocessor can be briefly disturbed. If the microprocessor returns to correct operation after the disturbance has ended, this causes no problems; but in such cases the microprocessor can also permanently xe2x80x9chang up,xe2x80x9d i.e. be suspended in an undefined state. In this instance the microprocessor is no longer performing its desired function, which is usually not permissible.
Numerous circuits for monitoring such microprocessors are therefore known, for example from DE 32 14 006 A1 and corresponding U.S. Pat. No. 4,512,019 or EP-A1 0 658 973 and corresponding U.S. Pat. No. 5,590,235.
An apparatus as defined by the latter document is particularly low-cost and reliable, but requires a special program structure so that no data are lost during a reset operation. Since, with this arrangement, a reset operation takes place with each motor revolution, these reset operations must occur in program segments in which the interruption resulting from the reset operation has no deleterious consequences. A program structure of this kind is not possible for all applications, for example if the microprogram consists principally of software counters which would be continually disturbed by the effects of such a reset operation. Correct real-time measurement would thus be very difficult.
A known apparatus of this kind with cyclical reset operations is also ineffective if the reset signals are completely absent. Such is the case, for example in a motor, if the rotor is immobilized and no further reset signals are therefore being generated. With small motors in particular, such as those which are used to drive equipment fans and have lower outputs (for example from 1 to 3 W), the rotor can easily be immobilized by external influences, and in such a case no further reset operations take place.
One object of the invention is therefore to make available a new method for monitoring a microprocessor, and an apparatus for carrying out such a method.
According to the invention, this object is achieved by using capacitor charging and discharging circuits which respond to normal operation of the microprocessor by maintaining the voltage on the capacitor within a predetermined range, and a watchdog circuit which responds to capacitor voltage outside the predetermined range by resetting the microprocessor. The result is a simple, space-saving, and low-cost watchdog apparatus which can be carried out on small circuit boards. With it, reliable operation of a device can be maintained even in a highly disturbed environment, and it is possible to achieve higher interference classes in government tests. In addition, the microprocessor runs reliably regardless how quickly or slowly its operating voltage rises. The invention can also be used in microprocessors which have an internal WI (watchdog), since operating reliability is additionally enhanced by an external WD. (The internal WD may also be subject to disturbance and may not function, in which case the external WD then becomes effective.)